<template>
  <div>
    <div v-if="!show">
      <van-nav-bar
        title="我的余额"
        left-text="返回"
        right-text="余额明细"
        left-arrow
        @click-left="$router.go(-1)"
        @click-right="onClickRight"
      />
      <div class="prices">
        <div class="price">
          <span>我的余额</span>
          <span class="color">0学习币</span>
        </div>
        <div class="price-item">
          <div class="price">充值说明</div>
        </div>
        <van-button class="price-footer">立即充值</van-button>
      </div>
    </div>
    <div v-else>
      <van-nav-bar
        title="余额明细"
        left-text="返回"
        left-arrow
        @click-left="$router.go(-1)"
      />
      <div class="prices1">
        <p>没有更多了</p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      show: false,
    };
  },
  methods: {
    onClickRight() {
      this.show = true;
    },
  },
};
</script>

<style lang="scss" scoped>
.prices {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: rgb(242, 243, 245);
  font-size: 12px;
  .price {
    width: 100%;
    height: 1.52rem;
    background: #fff;
    line-height: 1.52rem;
    font-size: 0.427rem;
    span {
      padding-left: 0.4rem;
    }
    .color {
      padding-left: 0.267rem;
      color: #dc692a;
    }
  }
  .price-item {
    flex: 1;
    width: 100%;
    margin-top: 0.4rem;
    margin-bottom: 1.333rem;
    .price {
      background: #fff;
      padding-top: 0.533rem;
      padding-left: 0.4rem;
      font-weight: 600;
      font-size: 0.373rem;
      line-height: 1px;
    }
  }
  .price-footer {
    width: 100%;
    height: 1.333rem;
    // color: #fff;
    position: fixed;
    bottom: 0;
  }
}
.prices1 {
  color: #969799;
  font-size: 0.373rem;
  line-height: 1.333rem;
  text-align: center;
}
</style>